Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expensify-common #15409

Merged
merged 3 commits into from
Mar 2, 2023
Merged

Update expensify-common #15409

merged 3 commits into from
Mar 2, 2023

Conversation

Gonals
Copy link
Contributor

@Gonals Gonals commented Feb 23, 2023

Details

Fixed Issues

$ #15372

Tests

  • Open Newdot and start a chat
  • Write # Hello. Hello should get formatted as a header
  • Write # Hello (with two spaces). Hello should get formatted as a header
  • Write
#  
Hello

(with two spaces after the #). Hello should NOT get formatted as a header and the # should remain visible

  • Verify that no errors appear in the JS console

Offline tests

None

QA Steps

Same as tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

@Gonals Gonals requested a review from a team as a code owner February 23, 2023 12:34
@Gonals Gonals self-assigned this Feb 23, 2023
@MelvinBot
Copy link

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

1 similar comment
@MelvinBot
Copy link

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

@melvin-bot melvin-bot bot requested review from PauloGasparSv and removed request for a team February 23, 2023 12:35
@MelvinBot
Copy link

@PauloGasparSv Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@Gonals Gonals changed the title [WIP] Update expensify-common Update expensify-common Feb 27, 2023
@Gonals
Copy link
Contributor Author

Gonals commented Feb 27, 2023

Not adding screenshots, since we are just updating expensify-common

@PauloGasparSv
Copy link
Contributor

PauloGasparSv commented Feb 27, 2023

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web image
Mobile Web - Chrome image
Mobile Web - Safari image
Desktop image
iOS image
Android image

Copy link
Contributor

@PauloGasparSv PauloGasparSv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PauloGasparSv
Copy link
Contributor

Hey @Gonals didn't merge this because there were tests running. Can we merge this now?

@Gonals Gonals merged commit c0f14f4 into main Mar 2, 2023
@Gonals Gonals deleted the alberto-heading branch March 2, 2023 11:04
@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

Performance Comparison Report 📊

Significant Changes To Duration

There are no entries

Meaningless Changes To Duration

Show entries
Name Duration
Open Search Page TTI 623.396 ms → 671.623 ms (+48.227 ms, +7.7%)
App start TTI 677.856 ms → 694.113 ms (+16.257 ms, +2.4%)
App start runJsBundle 177.226 ms → 188.290 ms (+11.065 ms, +6.2%)
App start regularAppStart 0.013 ms → 0.013 ms (+0.000 ms, +2.1%)
App start nativeLaunch 22.097 ms → 21.290 ms (-0.806 ms, -3.6%)
Show details
Name Duration
Open Search Page TTI Baseline
Mean: 623.396 ms
Stdev: 25.697 ms (4.1%)
Runs: 583.0543630002066 586.0613609999418 586.1193850003183 587.6932779997587 591.9292810000479 599.6436359994113 601.988851999864 604.7368580000475 606.033690999262 606.7810060000047 607.0142409997061 609.6223560003564 610.0167650002986 614.1757810004056 614.4162600003183 617.1247960003093 619.1545410007238 621.7049559997395 627.4765630001202 627.7907309997827 631.8414709996432 632.0517580006272 634.7530520008877 639.0591230001301 640.5699469996616 644.0550540005788 646.6028650002554 650.3911950001493 656.6335460003465 660.8313400000334 661.156534999609 662.837728000246 688.7556159999222

Current
Mean: 671.623 ms
Stdev: 29.880 ms (4.4%)
Runs: 611.6486820001155 619.0505379997194 628.9091799994931 631.7396249994636 634.1448570005596 634.1996260005981 642.8978279996663 645.2842609994113 654.2050379998982 654.319174000062 659.7526449998841 662.3687340002507 662.566366000101 663.9711100002751 671.1715089995414 675.3407789999619 676.915364000015 677.2325849998742 678.6119790002704 679.6621090006083 681.1434329999611 681.9420980000868 683.7427570000291 685.2263190001249 688.5536710005254 689.5293380003422 695.7704269997776 695.8295089993626 707.523072000593 710.8653570003808 722.0484210001305 726.082154000178 731.3118499992415
App start TTI Baseline
Mean: 677.856 ms
Stdev: 22.133 ms (3.3%)
Runs: 632.1589080002159 641.9849420003593 642.7447089999914 649.1538119995967 653.1495719999075 655.4031809996814 659.9029519995674 660.4587359996513 663.1473300000653 663.2542789997533 670.9710459997877 671.2108749998733 672.8538419995457 677.7289239997044 677.8203389998525 678.981119999662 681.2111430000514 681.31442300044 682.8943579997867 683.1659150002524 686.2875220002607 688.5172049999237 691.3894920004532 693.3352499995381 695.1747110001743 695.5045010000467 706.5834499998018 709.9034219998866 714.929051999934 714.9981370000169 717.4161780001596

Current
Mean: 694.113 ms
Stdev: 30.210 ms (4.4%)
Runs: 635.692137000151 651.1130280001089 652.2198689999059 659.8287049997598 660.1512860003859 668.0455590002239 671.160768000409 672.8289240002632 674.4466570001096 675.1685979999602 676.1063599996269 681.7548009995371 688.9295330001041 690.7843899996951 691.0350780002773 691.6056960001588 691.6570539996028 694.9558589998633 697.0108979996294 698.312555000186 704.3046230003238 710.6344860000536 710.7221969999373 711.5953869996592 713.807094999589 722.4176409998909 723.0918530002236 726.637648999691 755.8883990002796 756.3498989995569 759.2455059997737
App start runJsBundle Baseline
Mean: 177.226 ms
Stdev: 14.644 ms (8.3%)
Runs: 155 157 157 160 164 165 166 166 168 168 169 170 171 173 175 175 175 176 178 179 179 184 184 188 189 190 191 197 201 209 215

Current
Mean: 188.290 ms
Stdev: 20.678 ms (11.0%)
Runs: 165 166 167 168 168 170 170 172 174 175 177 177 178 179 180 180 180 182 184 189 195 196 200 202 205 207 211 219 222 237 242
App start regularAppStart Baseline
Mean: 0.013 ms
Stdev: 0.001 ms (4.8%)
Runs: 0.012167000211775303 0.01224799919873476 0.012370000593364239 0.012492000125348568 0.012532999739050865 0.0125730000436306 0.012574000284075737 0.012735999189317226 0.012777000665664673 0.012939000502228737 0.012980000115931034 0.012980000115931034 0.013020999729633331 0.013020999729633331 0.013061000034213066 0.013101999647915363 0.013224000111222267 0.013224000111222267 0.013224000111222267 0.013224000111222267 0.013345999643206596 0.013468999415636063 0.013549000024795532 0.0138349998742342 0.013875000178813934 0.013957000337541103 0.014200999401509762 0.014526999555528164 0.0147299999371171

Current
Mean: 0.013 ms
Stdev: 0.001 ms (4.5%)
Runs: 0.012248000130057335 0.012248000130057335 0.01261299941688776 0.012777000665664673 0.01281800027936697 0.012899000197649002 0.012938999570906162 0.013020000420510769 0.013062000274658203 0.013102000579237938 0.01314299926161766 0.013183999806642532 0.013224000111222267 0.013264999724924564 0.013346999883651733 0.013387000188231468 0.013426999561488628 0.0134680001065135 0.013468999415636063 0.013548999093472958 0.013631000183522701 0.01375299971550703 0.013793999329209328 0.013794000260531902 0.013915999792516232 0.013915999792516232 0.014038000255823135 0.014241999946534634 0.014404000714421272 0.01444500032812357 0.01444500032812357 0.014649000018835068
App start nativeLaunch Baseline
Mean: 22.097 ms
Stdev: 2.441 ms (11.0%)
Runs: 19 19 19 20 20 20 20 20 21 21 21 21 21 21 21 21 21 22 22 22 22 23 23 24 24 24 25 25 27 28 28

Current
Mean: 21.290 ms
Stdev: 2.067 ms (9.7%)
Runs: 18 18 19 19 19 19 19 20 20 20 20 20 21 21 21 21 21 21 22 22 22 22 22 23 23 23 24 24 25 25 26

@OSBotify
Copy link
Contributor

OSBotify commented Mar 2, 2023

🚀 Deployed to staging by https://github.com/Gonals in version: 1.2.78-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Mar 6, 2023

🚀 Deployed to production by https://github.com/mountiny in version: 1.2.78-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants